<%-- 
    Document   : generar_compra
    Created on : 04-ene-2013, 22:18:07
    Author     : Cannibal-Slayer
--%>

<%@page import="CapaLogica.Articulo"%>
<%@page import="CapaLogica.Usuario"%>
<%@page import="java.util.LinkedList"%>
<%@page import="recursos.interfaz_com"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
        
        LinkedList carrito = (LinkedList) session.getAttribute("carrito");
        double total = (Double) session.getAttribute("costo_total");
        
        int id_usuario = Integer.parseInt((String) session.getAttribute("id_usuario"));
        String nombre = (String) request.getParameter("nombre");
        String shipping = (String) request.getParameter("shipping");
        int pago = Integer.parseInt(request.getParameter("pago"));
        int region = Integer.parseInt(request.getParameter("region"));
        
        interfaz_com com = new interfaz_com();
        LinkedList<Articulo> datos = com.deparcear(carrito);
        com.comprar(id_usuario, datos, total, pago, region);
        
       
                       
        
        %>
    </body>
</html>
